include ../includes/head

block content
    include ../includes/header
.container-fluid
    .row
        include ../includes/slide
        .col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2.main
            .row
                - if (!denied)
                  .col-sm-11
                    h1.page-header 人员列表
                  .col-sm-1
                    a.btn.btn-success(href='/member/add') 添加人员
                - else
                    h2.page-header 没有权限
            - if (!denied)
              .row
                .table-responsive
                    table.table.table-bordered
                        caption 下表为所有人员列表
                        thead
                            tr
                                th  序号
                                th  用户名
                                th  创建人
                                th  密码
                                th  手机号
                                th  邮箱
                                th  角色
                                th  操作
                        if (result)
                            each item, index in result
                                if(item)
                                    tr.list_tr
                                        td #{index + 1}
                                        td #{item.username}
                                        td #{item.ownername}
                                        td #{item.password}
                                        td #{item.mobile}
                                        td #{item.email}
                                        case item.role_id
                                            when 1: td admin
                                            when 2: td 超级管理员
                                            when 3: td 超级用户
                                            when 4: td 项目管理员
                                            default: td 普通用户
                                        td
                                            a.delBtn(href='javascript:void(0);' data-id='#{item.id}' data-type='member')  删除
                                                span.glyphicon.glyphicon-remove
                                            a.editBtn(href='/member/edit/#{item.id}' data-id='#{item.id}') 编辑
                                                span.glyphicon.glyphicon-edit



include ../includes/footer
script(src='/requirejs/require.js' data-main="/javascript/member/list")
